<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
		<title>Bootstrap 实例</title>
		<link href="css/bootstrap.min.css" rel="stylesheet">
		<style type="text/css">
			img {
				width: 100%;
			}

			.damu-thumbnail img {
				width: auto;
			}

			.damu-carousel,
			.damu-carousel .item {
				height: 500px;
				overflow: hidden;
			}

			.carousel-caption {
				bottom: 50%;
			}

			/*这里使用自适应*/
			@media only screen and (max-width:768px) {
				.carousel-caption {
					bottom: 20%;
				}

				.damu-carousel,
				.damu-carousel>.item {
					height: 200px;
				}
			}

			.damu-container {
				margin-top: 50px;
			}

			.damu-hr>hr {
				margin: 50px auto;
				border: 2px solid deeppink;
			}
		</style>

		<!--[if lt IE 9]>
		  <script src="js/html5shiv.min.js"></script>
		  <script src="js/respond.min.js"></script>
		<![endif]-->
	</head>
	<body>
		<!-- 导航 -->
		<nav class="navbar navbar-inverse navbar-fixed-top">
			<div class="container">
				<!-- Brand and toggle get grouped for better mobile display -->
				<div class="navbar-header">
					<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"
					 aria-expanded="false">
						<span class="sr-only">Toggle navigation</span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
					</button>
					<a class="navbar-brand" href="#">现代浏览器博物馆</a>
				</div>

				<!-- Collect the nav links, forms, and other content for toggling -->
				<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
					<ul class="nav navbar-nav">
						<li class="active"><a href="#">综述 <span class="sr-only">(current)</span></a></li>
						<li><a href="#">简述 </a></li>
						<li class="dropdown">
							<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">特点
								<span class="caret"></span></a>
							<ul class="dropdown-menu" id="damu-nav">
								<li><a href="#chrome">Chrome</a></li>
								<li><a href="#firefox">Firefox</a></li>
								<li><a href="#safari">Safari</a></li>
								<li><a href="#opera">Opera</a></li>
								<li><a href="#ie">IE</a></li>
							</ul>
						</li>
						<!-- 模态框激活，需要设置 data-target="#myModal" data-toggle="modal" 同时 href设置为javascript -->
						<li> <a href="javascript:;" data-target="#myModal" data-toggle="modal">关于 </a> </li>
					</ul>

				</div><!-- /.navbar-collapse -->
			</div><!-- /.container-fluid -->
		</nav>

		<!-- 轮播 -->
		<div id="carousel-example-generic" class="carousel slide damu-carousel" data-ride="carousel">
			<!-- Indicators -->
			<ol class="carousel-indicators">
				<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
				<li data-target="#carousel-example-generic" data-slide-to="1"></li>
				<li data-target="#carousel-example-generic" data-slide-to="2"></li>
				<li data-target="#carousel-example-generic" data-slide-to="3"></li>
				<li data-target="#carousel-example-generic" data-slide-to="4"></li>
			</ol>

			<!-- Wrapper for slides -->
			<div class="carousel-inner" role="listbox">
				<div class="item active">
					<img src="images/chrome-big.jpg" alt="...">
					<div class="carousel-caption">
						<h2>chrome</h2>
					</div>
				</div>
				<div class="item">
					<img src="images/firefox-big.jpg" alt="...">
					<div class="carousel-caption">
						<h2>firefox</h2>
					</div>
				</div>
				<div class="item">
					<img src="images/safari-big.jpg" alt="...">
					<div class="carousel-caption">
						<h2>safari</h2>
					</div>
				</div>
				<div class="item">
					<img src="images/opera-big.jpg" alt="...">
					<div class="carousel-caption">
						<h2>opera</h2>
					</div>
				</div>
				<div class="item">
					<img src="images/ie-big.jpg" alt="...">
					<div class="carousel-caption">
						<h2>ie</h2>
					</div>
				</div>
			</div>

			<!-- Controls -->
			<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
				<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
				<span class="sr-only">Previous</span>
			</a>
			<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
				<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
				<span class="sr-only">Next</span>
			</a>
		</div>

		<!-- 三列布局 -->
		<div class="container damu-container">
			<div class="row">
				<div class="col-sm-6 col-md-4 damu-thumbnail text-center">
					<img src="images/chrome-logo-small.jpg">
					<div class="caption">
						<h3>Chrome</h3>
						<p>Chrome的介绍</p>
						<p><a href="#" class="btn btn-primary" role="button">Button</a>
					</div>
				</div>
				<div class="col-sm-6 col-md-4 damu-thumbnail text-center">
					<img src="images/firefox-logo-small.jpg">
					<div class="caption">
						<h3>Firefox</h3>
						<p>Firefox的介绍</p>
						<p><a href="#" class="btn btn-primary" role="button">Button</a>
					</div>
				</div>
				<div class="col-sm-6 col-md-4 damu-thumbnail text-center">
					<img src="images/safari-logo-small.jpg">
					<div class="caption">
						<h3>Safari</h3>
						<p>Safari的介绍</p>
						<p><a href="#" class="btn btn-primary" role="button">Button</a>
					</div>
				</div>
			</div>
		</div>

		<!-- 线 -->
		<div class="container damu-hr">
			<hr />
		</div>

		<!-- 标签页 -->
		<div id="damu-tab" class="container">

			<!-- Nav tabs -->
			<ul id="damu-list" class="nav nav-tabs" role="tablist">
				<li role="presentation" class="active"><a href="#chrome" aria-controls="chrome" role="tab" data-toggle="tab">Chrome</a></li>
				<li role="presentation"><a href="#firefox" aria-controls="firefox" role="tab" data-toggle="tab">Firefox</a></li>
				<li role="presentation"><a href="#safari" aria-controls="safari" role="tab" data-toggle="tab">Safari</a></li>
				<li role="presentation"><a href="#opera" aria-controls="opera" role="tab" data-toggle="tab">Opera</a></li>
				<li role="presentation"><a href="#ie" aria-controls="ie" role="tab" data-toggle="tab">IE</a></li>
			</ul>

			<!-- Tab panes -->
			<div class="tab-content">

				<div role="tabpanel" class="tab-pane active" id="chrome">
					<div class="container-fluid">
						<div class="row">
							<div class="col-md-7">
								<h3>IE 没法使用</h3>
								IE 没法使用 那么就用 Chrome
							</div>
							<div class="col-md-5">
								<img src="images/chrome-logo.jpg">
							</div>
						</div>
					</div>
				</div>

				<div role="tabpanel" class="tab-pane" id="firefox">
					<div class="container-fluid">
						<div class="row">
							<div class="col-md-5">
								<img src="images/firefox-logo.jpg">
							</div>
							<div class="col-md-7 text-right">
								<h3>IE 没法使用</h3>
								IE 没法使用 那么就用 Firefox
							</div>
						</div>
					</div>
				</div>

				<div role="tabpanel" class="tab-pane" id="safari">
					<div class="container-fluid">
						<div class="row">
							<div class="col-md-5">
								<img src="images/safari-logo.jpg">
							</div>
							<div class="col-md-7">
								<h3>IE 没法使用</h3>
								IE 没法使用 那么就用 Safari
							</div>
						</div>
					</div>
				</div>

				<div role="tabpanel" class="tab-pane" id="opera">
					<div class="container-fluid">
						<div class="row">
							<div class="col-md-5">
								<img src="images/opera-logo.jpg">
							</div>
							<div class="col-md-7">
								<h3>IE 没法使用</h3>
								IE 没法使用 那么就用 Opera
							</div>
						</div>
					</div>
				</div>

				<div role="tabpanel" class="tab-pane" id="ie">
					<div class="container-fluid">
						<div class="row">
							<div class="col-md-5">
								<img src="images/ie-logo.jpg">
							</div>
							<div class="col-md-7">
								<h3>IE 没法使用</h3>
								IE 能用就用
							</div>
						</div>
					</div>
				</div>

			</div>
		</div>

		<!-- 版权 注意这个 &copy 叫做版权的实体字符 -->
		<div class="container">
			&copy; 尚硅谷
		</div>

		<!-- 模态框 -->
		<!-- 模态框激活，需要设置 data-target="#myModal" data-toggle="modal" 同时 href设置为javascript -->
		<div id="myModal" class="modal fade" tabindex="-1" role="dialog">
			<div class="modal-dialog" role="document">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
						<h4 class="modal-title">Modal title</h4>
					</div>
					<div class="modal-body">
						<p>自定义模态框</p>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
					</div>
				</div><!-- /.modal-content -->
			</div><!-- /.modal-dialog -->
		</div><!-- /.modal -->
		
		<script src="js/jquery.min.js"></script>
		<script src="js/bootstrap.min.js"></script>
	</body>
	<script type="text/javascript">
		$(function(){
			$("#damu-nav>li>a").click(function(e){
				e.preventDefault();
				var href = $(this).attr("href");// 这个打印出来是类似"#ie"
				$(document).scrollTop($("#damu-tab").offset().top);// 这个可以去jquery.com->css中查找
				$("#damu-list>li>a[href="+(href)+"]").tab('show');
			})
		})
	</script>
	
</html>
